package com.erp.erp_servers.Dictionary;


import com.erp.erp_entitys.DictionaryKey.DictionaryKeyEntity;
import com.erp.erp_entitys.DictionaryKey.DictionaryTreeEntity;

import java.util.List;

/**
 * @ClassName IDictionaryKeyService
 * @Description
 * @Author songjizhen
 * @Date 2020/6/17 14:02
 * @Version 1.0
 */
public interface IDictionaryService {
    /**
     * 根据code获取字典key值
     * @param code
     * @return
     */
    DictionaryKeyEntity selectKeyByCode(int code);
    /**
     * 根据主键更新字典
     * @param record
     * @return
     */
    int updateKeyByCode(DictionaryKeyEntity record);
    /**
     * 插入字典数据
     * @param record
     * @return
     */
    int insertKey(DictionaryKeyEntity record);
    /**
     * 获取所有字典
     * @return
     */
    List<DictionaryKeyEntity> selectKeyAll();

    /**
     * 获取字典树
     * @return
     */
    DictionaryTreeEntity getDictionryTree();
    /**
     * 获取父节点下所有子节点
     * @param code
     * @return
     */
    List<DictionaryKeyEntity> selectKeyByParent(int code);

    /**
     * 获取父节点下所有子节点code
     * @param code
     * @return
     */
     String selectCodesByParent(int code);

}
